package com.xquant.marketdata.marketdata.service.impl;

import com.github.pagehelper.PageInfo;
import com.xquant.marketdata.marketdata.domain.FutureInfoDTO;
import com.xquant.marketdata.marketdata.mapper.FuturesMapper;
import com.xquant.marketdata.marketdata.service.FuturesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Auther: B946
 * @Date: 23/12/2019 10:17
 * @Description:
 */
@Service
public class FuturesServiceImpl implements FuturesService {


    @Autowired
    private FuturesMapper futuresMapper;

    @Override
    public PageInfo<Map>  queryStockIndexFutureContractByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryStockIndexFutureContractByPage(params);
        return new PageInfo<Map>(list);
    }

    @Override
    public PageInfo<Map>  queryStockIndexFuturePriceByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryStockIndexFuturePriceByPage(params);
        return new PageInfo<Map>(list);
    }
    @Override
    public PageInfo<Map>  queryBondFutureContractByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryBondFutureContractByPage(params);
        return new PageInfo<Map>(list);
    }

    @Override
    public PageInfo<Map>  queryBondFuturePriceByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryBondFuturePriceByPage(params);
        return new PageInfo<Map>(list);
    }
    @Override
    public List<FutureInfoDTO>  queryCmdtFutureInfoByPage(Map<String,Object> params){
        return futuresMapper.queryCmdtFutureInfoByPage(params);
    }

    @Override
    public PageInfo<Map>  queryCmdtFuturePriceByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryCmdtFuturePriceByPage(params);
        return new PageInfo<Map>(list);
    }

    @Override
    public PageInfo<Map>  queryCmdtDelayContractByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryCmdtDelayContractByPage(params);
        return new PageInfo<Map>(list);
    }

    @Override
    public PageInfo<Map>  queryCmdtDelayPriceByPage(Map<String,Object> params){
        List<Map>   list = futuresMapper.queryCmdtDelayPriceByPage(params);
        return new PageInfo<Map>(list);
    }

}
